home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 February
/
EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso
/
progs
/
editor
/
frexxed
/
fpl
/
swapbuffer.fpl
< prev
next >
Wrap
Text File
|
1995-07-27
|
1KB
|
48 lines
export void SwapBuffer(int direction)
{
int oldbuffer=GetBufferID();
int newentry;
if (ReadInfo("buffers")>1) {
if (direction)
newentry=NextBuffer(oldbuffer, ReadInfo("type"));
else
newentry=PrevBuffer(oldbuffer, ReadInfo("type"));
if (newentry!=oldbuffer) {
if (ReadInfo("visible", newentry))
newentry=DuplicateEntry(newentry);
Activate(newentry, 0);
if (ReadInfo("shared")>1) {
Visible(0);
Kill();
}
CurrentBuffer(newentry);
Visible(1);
}
}
}
export void GetBuffer()
{
int newentry;
if (ReadInfo("buffers")>1) {
newentry=PromptBuffer("Select buffer", 1);
if (ReadInfo("visible", newentry))
newentry=DuplicateEntry(newentry);
Activate(newentry);
if (ReadInfo("shared")>1) {
Visible(0);
Kill();
}
CurrentBuffer(newentry);
Visible(1);
}
}
AssignKey("SwapBuffer(0);", "Alt 'Left'");
AssignKey("SwapBuffer(1);", "Alt 'Right'");
AssignKey("GetBuffer();", "Amiga G");